/* 森系配色方案 */
:root {
  --forest-green: #228B22;
  --sage-green: #9CAF88;
  --moss-green: #8A9A5B;
  --light-green: #E8F5E9;
  --dark-green: #1B5E20;
  --wood-brown: #8B4513;
  --earth-brown: #A0522D;
  --soft-beige: #F5F5DC;
  --leaf-green: #388E3C;
  --text-dark: #333333;
  --text-light: #f0f0f0;
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--light-green), #c8e6c9);
  background-attachment: fixed;
  color: var(--text-dark);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  box-shadow: 0 10px 30px var(--shadow);
  padding: 30px;
  backdrop-filter: blur(10px);
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px dashed var(--sage-green);
}

header h1 {
  color: var(--dark-green);
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px var(--shadow);
}

header p {
  color: var(--moss-green);
  font-size: 1.1rem;
}

.stats {
  display: flex;
  justify-content: space-around;
  background: linear-gradient(to right, var(--leaf-green), var(--moss-green));
  color: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 4px 8px var(--shadow);
}

.stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.stat-item span {
  font-size: 1.5rem;
  font-weight: bold;
}

.game-area {
  margin-bottom: 30px;
}

.quote-display {
  background-color: var(--light-green);
  border: 2px solid var(--sage-green);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  min-height: 120px;
  font-size: 1.4rem;
  line-height: 1.6;
  box-shadow: inset 0 2px 5px var(--shadow);
  position: relative;
  overflow: hidden;
}

.quote-display::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  pointer-events: none;
}

.correct {
  color: var(--dark-green);
}

.current {
  color: var(--wood-brown);
  text-decoration: underline;
  font-weight: bold;
}

.untyped {
  color: var(--text-dark);
}

.typing-input {
  width: 100%;
  height: 120px;
  padding: 15px;
  font-size: 1.2rem;
  border: 2px solid var(--sage-green);
  border-radius: 10px;
  resize: none;
  outline: none;
  transition: border-color 0.3s;
  background-color: rgba(255, 255, 255, 0.8);
}

.typing-input:focus {
  border-color: var(--leaf-green);
  box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.2);
}

.controls {
  text-align: center;
  margin-top: 20px;
}

.btn {
  background: linear-gradient(to bottom, var(--leaf-green), var(--dark-green));
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 8px var(--shadow);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

.quote-selection {
  text-align: center;
  padding-top: 20px;
  border-top: 2px dashed var(--sage-green);
}

.quote-selection h3 {
  color: var(--dark-green);
  margin-bottom: 10px;
}

#quote-set {
  padding: 10px;
  font-size: 1rem;
  border: 2px solid var(--sage-green);
  border-radius: 8px;
  background-color: white;
  color: var(--text-dark);
}

/* 动效类 */
.highlight {
  animation: highlight 0.5s ease;
}

@keyframes highlight {
  0% {
    transform: scale(1);
    color: var(--wood-brown);
  }
  50% {
    transform: scale(1.2);
    color: var(--dark-green);
  }
  100% {
    transform: scale(1);
    color: var(--wood-brown);
  }
}

.correct-char {
  position: relative;
}

.correct-char::after {
  content: "✓";
  position: absolute;
  top: -10px;
  right: -10px;
  color: var(--leaf-green);
  font-size: 0.8rem;
  animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* 响应式设计 */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .stats {
    flex-direction: column;
    gap: 10px;
  }
  
  .quote-display {
    font-size: 1.2rem;
    padding: 15px;
  }
}